import CheckOutOrderIndex from './checkOutOrderIndex'
import CheckOutOrderList from './checkOutOrderList'
import CheckOutOrderAdd from './checkOutOrderAdd' //退租表单提交
import CheckOutOrderDetail from './checkOutOrderDetail' //退租列表详情


const checkOutOrderRouter = {

  path: 'landlord/rentManage/checkOutList',
  getChildRoutes(location, cb) {
    require.ensure([], (require) => {
      cb(null, [
        {
          path: 'list',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, CheckOutOrderList)
            })
          },

        },
        {
          path: 'add',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, CheckOutOrderAdd)
            })
          }
        },
        {
          path: 'detail',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, CheckOutOrderDetail)
            })
          }
        }
      ])
    })
  },

  indexRoute: {
    getComponents(location, cb) {
      require.ensure([], function (require) {
        cb(null, CheckOutOrderList)
      })
      return cb()
    }
  },

  getComponents(nextState, cb) {
    require.ensure([], (require) => {
      cb(null, CheckOutOrderIndex)
    })
  }
}


export default checkOutOrderRouter;

